package model.autolight.sequential;

import model.common.LED;
import framework.common.DeviceRequest;
import framework.common.DeviceResponse;
import framework.common.SensorRequest;
import framework.sequential.Client;

public class LEDClient extends Client implements LED {

	public LEDClient(String user) {
		super(user);
	}

	public void lightOn() {
		DeviceRequest req = new DeviceRequest(this);
		req.add(new SensorRequest(SensorRequest.SET, "LED",Integer.valueOf(1)));
		DeviceResponse res =request(req);
		System.out.println(res);
	}

	public void lightOff() {
		DeviceRequest req = new DeviceRequest(this);
		req.add(new SensorRequest(SensorRequest.SET, "LED",Integer.valueOf(0)));
		request(req);
		DeviceResponse res =request(req);
		System.out.println(res);
	}
}
